#include "stdio.h"
struct comp
{
	double real,imag;
};
int main()
{ 
	struct comp x,y,sum,mul;
	scanf("%lf%lf%lf%lf",&x.real,&x.imag,&y.real,&y.imag);
	sum.real=x.real+y.real;
	sum.imag=x.imag+y.imag;
	mul.real=x.real*y.real-x.imag*y.imag;
	mul.imag=x.real*y.imag+x.imag*y.real;
	printf("sum.real=%.2lf and sum.imag=%.2lf\n",sum.real,sum.imag);
	printf("mul.real=%.2lf and mul.imag=%.2lf\n",mul.real,mul.imag);
	return 0;
} 
